﻿using System;
using System.Collections.Generic;
using System.Text;
using Paros.Domain;
namespace Paros.Win
{
    internal class UserPreferences
    {
        public static CategoryItem SelectedCategory { get; set; }
        public static EntryItem SelectedEntry { get; set; }
        public string Theme { get; set; }
 
        public static string[] EntryListColumns {
            get
            {
                return new string[] { "Title", "Datetime"};
            }
        }

        internal static class DocumentList
        {
            /// <summary>
            /// string: controlID
            /// Boolean: is saved
            /// </summary>
            public static IDictionary<string, bool> Documents = new Dictionary<string, bool>();
            public static void Add(string docId)
            {
                if (Documents != null)
                {
                    Documents.Add(docId, false);
                }
            }

            public static void Update(string docId, bool newValue)
            {
                if (Documents != null)
                {
                    Documents[docId] = newValue;
                }
            }

            public static void Remove(string docId)
            {
                if (Documents != null)
                {
                    Documents.Remove(docId);
                }
            }
        }
    }

    
}
